@extends('layouts.app')

@section('content')
<style>
.pagination{
    margin:0
}
</style>
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">商品列表</div>

                <div class="panel-body">
                    <ul class="list-group">
                        
                       @foreach ($data as $key => $val)
                            <li class="list-group-item">
                                <span style="float:right">
                                    <a href="{{ url('/goods/edit-'.$val->id.'.html') }}">编辑</a>
                                    <a href="{{ url('/goods/delete-'.$val->id.'.html') }}">删除</a>
                                </span>
                                <a href="{{ url('/goods/view-'.$val->id.'.html') }}">{{ $val->name }}</a>
                            </li>
                        @endforeach

                    </ul>
                    
                    @if($data->render() !== "")
                        <div class="box-footer">
                            {!! $data->render() !!}
                        </div>
                    @endif
                    
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
